import axiosInstance from "../axiosInstance";

const userInfo = {
    checkUserPhone(user_phone) {
        return axiosInstance.post("/user/checkUserPhone", { user_phone })
    },
    findUserPhone(user_phone) {
        return axiosInstance.post("/user/findUserPhone", { user_phone })
    },
    checkNickName(nickName) {
        return axiosInstance.post("user/checkNickName", { nickName })
    },
    uploadUserPhoto(file) {
        let formData = new FormData();
        formData.append("user_photo", file)
        return axiosInstance.post("/user/uploadUserPhoto", formData, {
            headers: {
                "Content-Type": "multipart/form-data"
            }
        })
    },
    register(data) {
        return axiosInstance.post("/user/register", data)
    },
    login(data) {
        return axiosInstance.post("/user/login", data)
    }
}

export default userInfo;